#include "Dame.h"
#include "iostream"

Dame::Dame()
{}


Dame::Dame(int x,int y, bool white)
{
    m_x = x;
    m_y = y;
    m_white = white;

}
char
Dame::tostring()
{
   return( isWhite() ? 'D' : 'd');
}

void
Dame::affiche()
{
    cout << "Pion: x=" << m_x << " y=" << m_y << " "
         << ( isWhite() ? "blanche" : "noire" ) << endl;

}

bool
Dame::mouvementvalide(Echiquier *e, int x, int y )
{

    if (Piece::mouvementvalide(e,x,y))
    {
        Tour *tour = new Tour(m_x,m_y,m_white);
        Fou *fou = new Fou(m_x,m_y,m_white);

        return(fou->mouvementvalide(e,x,y) || tour->mouvementvalide(e,x,y));


    }
    else
        return false;
}



Dame::~Dame(){}
